package com.sky.service.impl;
import com.sky.entity.DishFlavor;
import com.sky.mapper.DishFlavorMapper;
import com.sky.service.DishFlavorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * @author 符健清
 * @version 1.0
 */
@SuppressWarnings({"all"})

@Service
public class DishFlavorServiceimpl implements DishFlavorService {
    @Autowired
    private DishFlavorMapper dishFlavorMapper;

    /**
     * 跟新口味表
     * @param dishFlavor
     */
    @Override
    public void updateDishFlavor(DishFlavor dishFlavor) {
        dishFlavorMapper.updateDishFlavor(dishFlavor);
    }

    /**
     * 添加口味
     * @param dishFlavor
     */
    @Override
    public void insertDishFlavor(DishFlavor dishFlavor) {
        dishFlavorMapper.insetDishFlavor(dishFlavor);
    }

    /**
     * dishId 查询口味
     * @param id
     * @return
     */
    @Override
    public  List<DishFlavor> selectDishFlavorByDIshId(Object id) {
       List <DishFlavor> dishFlavors= dishFlavorMapper.selectDishFlavorByDishId(id);
        return  dishFlavors;
    }
}
